import wepy from 'wepy'
import { User } from 'API'
export default class Gesture extends wepy.mixin {
  data = {

  }
  methods = {

  }


  async onPullDownRefresh() {
    let { code } = await wepy.login();
    let { data } = await User.login(code);
    global.userInfo = data
    this.$wxpage.complate()
    wx.showToast({
      title: "刷新成功"
    })
    setTimeout(() => {
      wx.hideToast()
      wx.stopPullDownRefresh()
    }, 1000)
  }
}
